﻿using System;
using UnityEngine;

// Token: 0x020001DA RID: 474
public class StompAction : AgentAction
{
	// Token: 0x06000A23 RID: 2595 RVA: 0x00059DAC File Offset: 0x00057FAC
	public StompAction(EntityBase target)
	{
		this.targetEntity = target;
		this.name = "Stomp: " + this.targetEntity.name;
	}

	// Token: 0x06000A24 RID: 2596 RVA: 0x00059DD6 File Offset: 0x00057FD6
	public StompAction(Vector3 target)
	{
		this.targetPoint = target.ToWorld();
		this.name = "Stomp: " + this.targetPoint.ToString();
	}

	// Token: 0x06000A25 RID: 2597 RVA: 0x00059E0C File Offset: 0x0005800C
	public override void StartAction()
	{
		if (this.targetEntity)
		{
			if (this.targetEntity.isDead)
			{
				this.Interrupt();
			}
			else
			{
				this.agent.ik.CrushTarget(this.targetEntity);
			}
		}
		else
		{
			this.agent.ik.CrushTarget(this.targetPoint);
		}
	}

	// Token: 0x06000A26 RID: 2598 RVA: 0x00059E75 File Offset: 0x00058075
	public override bool IsCompleted()
	{
		return this.hasStarted && this.agent.ik.crushEnded;
	}

	// Token: 0x06000A27 RID: 2599 RVA: 0x00059E95 File Offset: 0x00058095
	public override void Interrupt()
	{
		this.agent.ik.CancelFootCrush();
	}

	// Token: 0x04000F88 RID: 3976
	private EntityBase targetEntity;

	// Token: 0x04000F89 RID: 3977
	private Vector3 targetPoint;

	// Token: 0x04000F8A RID: 3978
	private GiantessIK ik;
}
